<?php
include 'config.php';
header("content-type:text/html;charset=utf-8");
$cautionline = isset($_POST['caution_line']) ? $_POST['caution_line'] : '';
$result = $mysql->selectList('caution_line');
$caution_line = @$result[0]['caution_line'];

if($caution_line == ""){
	$data = array("caution_line"=>$cautionline);
	$id = $mysql->insert('caution_line',$data);
	if($id == 0){
		echo 1;
	}
}else{
	$sql = "UPDATE caution_line SET `caution_line`='{$cautionline}'";
	$result = $mysql->execute($sql);
	if($result){
		echo 1;
	}
}